

namespace pdfviewnet
{
	using namespace System::Windows::Media::Imaging;
	using namespace System::Windows::Media;
	using namespace System::Windows;
	using namespace System::Runtime::InteropServices;
	using namespace System::Collections::Generic;


	value class Link
	{
	public:
		Link(int page, int linkIndex)
			: _pageSource(page), 
			_linkIndex(linkIndex)
		{
		}

		int _pageSource;
		int _linkIndex;
	};


	class PdfDocument
	{
	public:
		static PdfDocument* Create();

		virtual ~PdfDocument() {};
				
		virtual bool Load(char *) =0;
		virtual void RenderPage(System::Windows::Media::DrawingContext ^context, int ipage) =0;
		virtual BitmapSource^ RenderPage(int ipage, double zoom) =0;
	
		virtual int PageCount() =0;
	
		virtual cli::array<System::Windows::Rect>^ GetLinks(int ipage) =0;
		virtual System::String^ GetPageText(int pageNo, List<System::Windows::Rect>^ rects) =0;

		virtual double ComputeDefaultZoom(int pageNo, double width, double height) =0;
		virtual Rect getPageBox(UINT pageNo) =0;
		
		virtual int findPageNo(Link linkId) =0;
	
		virtual System::String^ GetLinkUri(Link linkId) =0;
	};

}

